#ifndef __BLE112LIB_H__
#define __BLE112LIB_H__

#include <Arduino.h>
#include <BGLib.h>

#define BLE_WAKEUP_PIN 8    // Assuming digital pin 5 is connected to BLE wake-up pin (P1_6 in my firmware)


class BLE112Lib{
	public:
		uint8_t hear_rate;
		///BGLib ble112((HardwareSerial *)&Serial2, 0, 1);
		bool StartBLE112(void);
		void CheckActivityBLE112(void);
		void SystemHello(void);
		void ConnectToHearRateMonitor(void);
		bool IsConnected(void);
		bool IsDisconnected(void);
		bool IsReseted(void);
		bool AlturaIsWrited(void);
		uint8_t GetHeartRate(void);
		void NotifyHeartRate(void);
		void Reset (void);
		void SetMode(int type_discover, int type_connect);
		void Disconect (void);

		void Write_Local_Attribute(int attribute, uint8 *value);
		void SetAdvParameters(uint16 adv_interval_min, uint16 adv_interval_max, uint8 adv_channels);
		void ConnectToMobile(void);
		
		bool IsDiscoverable(void);
		bool IsNotified(void);
		bool IsAdvCorrect(void);
		void SetReset(bool);
		void SetNotify(bool);
	


  // library-accessible "private" interface
	private:
		
		
};

#endif

